package com.scorpio.agentuser.vo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class CreateUserVo {

    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    @NotBlank(message = "手机号格式有误")
    private String username;

    @Pattern(regexp = "^[0-9A-Za-z]{6,20}$", message = "密码限制6-20位英文或数字")
    @NotBlank(message = "密码有误")
    private String password;

    @NotBlank(message = "联系姓名/单位")
    private String agentName;

    @NotBlank(message = "缺少电话号码")
    private String phone;

    @NotNull(message = "请选择省份")
    private Long provinceId;

    @NotNull(message = "请选择所在地址")
    private Long cityId;

    @NotNull(message = "请选择所在区域")
    private Long districtId;

    @NotBlank(message = "缺少详细地址")
    private String address;

}
